{extend name="web/public/base" /}
{block name="header"}
{/block}
{block name="main"}
<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li><a><i class="fa fa-home"></i> 首页</a></li>
        <li class="active">会员管理</li>
        <li class="active">{$title}</li>
    </ul>
    <div class="row">
        <div class="col-sm-12">
            <section class="panel panel-default">
                <header class="panel-heading"> {$title}</header>
                {include file="web/public/search" /}
                {notempty name="_list"}
                <div class="table-responsive">
                    <table class="table table-striped table-hover b-t b-light text-sm">
                        <thead>
                        <tr>
                            <th>ID号</th>
                            <th>会员账号[会员姓名]</th>
                            <!--<th>昵称</th>-->
                            <th>级别</th>
                            <!--<th>职务</th>-->
                            <!--<th>密码</th>-->
                            <th>推荐人</th>
                            <th>团队业绩</th>
                            <!--<th>报单中心</th>-->
                            <!--<th>所在地区</th>-->
                            <th>注册时间</th>
                            <th>会员状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name='_list' id='vo'}
                        <tr>
                            <td>{$vo.uid}</td>
                            <td>{$vo.usernumber}[{$vo.realname}]</td>
                            <!--<td>{$vo.nickname|default='暂无'}</td>-->
                            <td>{$vo.userrank|get_userrank}</td>
                            <!--<td>{$vo.level|get_level}</td>-->
                            <!--<td>{$vo.psd1}/{$vo.psd2}</td>-->
                            <td>{$vo.tuijianid|getInfo='usernumber',###}</td>
                            <td>{$vo.achievement}</td>
                            <!--<td>-->
                                <!--联盟{$vo.achievement1}&#45;&#45;-->
                                <!--团队（总）{$vo.achievement2}-->
                                <!--&lt;!&ndash;&#45;&#45;团队（累计）{$vo.achievement}&ndash;&gt;-->
                            <!--</td>-->

                            <!--<td>{$vo.billcenterid|getInfo="usernumber",###}</td>-->
                            <!--<td>{$vo.reg_time|date='Y-m-d H:i:s',###}</td>-->
                            <td>
                                {if condition="$vo['active_time'] gt 0"}
                                {$vo.active_time|date='Y-m-d H:i:s',###}
                                {else/}
                                暂无
                                {/if}
                            </td>

                            <td>{$vo.status|get_status}</td>
                            <td>
                                {egt name="vo.status" value="1"}
                                <a class="btn btn-danger" href="{:url('User/freezeStatus',array('id'=>$vo['uid'],'method'=>'freeze'))}">冻结会员</a>
                                {/egt}
                                {eq name="vo.status" value="-1"}
                                <a class="btn btn-success" href="{:url('User/freezeStatus',array('id'=>$vo['uid'],'method'=>'unfreeze'))}">解冻</a>
                                {/eq}

                                <!--<a class="btn btn-danger" href="{:url('TradingHall/handleMoney',array('id'=>$vo['uid']))}">扣币</a>-->
                                <!--{eq name="mid" value="1"}-->
                                <!--<a class="btn btn-danger" href="#" onclick="delMember('{$vo.uid}');">删除</a>-->
                                <!--{/eq}-->
                                <a class="btn btn-link" href="{:url('User/uinfo',array('id'=>$vo['uid']))}">更多操作>>></a>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
                <footer class="panel-footer">
                    <div class="row">
                        <div class="text-right text-center-xs">
                            {$page}
                        </div>
                    </div>
                </footer>
                {else/}
                <div style="text-align: center">
                    <image src="__PUBLIC__/images/empty.jpg"></image>
                </div>

                {/notempty}
            </section>
        </div>
    </div>
</section>
{/block}
{block name="script"}
<script type="text/javascript">
    function login(uid, psd) {

        var url = "/index/Index/admin_login";
        $.post(url, {id: uid, psd: psd}, function (data) {
            layer.msg(data.msg);
            if (data.code == 1) {
                targetBlank(data.url);
                location.reload();
            }
        }, "json");
        return false;
    }
    
//    function delMember(uid) {
//        var email = "{$email}";
//        if (!email) {
//            layer.msg("邮箱不存在")
//            return false;
//        }
//        layer.config({extend: 'extend/layer.ext.js'})
//        $.post("/index/Home/getEmailCode", {email: email}, function (data) {
//            var code = data.substr(data.length - 1, 1)
//            if (code == 0) {
//                layer.msg('邮箱验证码发送失败！');
//                return false;
//            }
//            layer.prompt({
//                title: '请输入您的邮箱收到的验证码',
//            }, function (value, index, elem) {
//
//                var reg = new RegExp("^[0-9]{6}$");
//                if (!reg.test(value)) {
//                    layer.msg("请输入正确验证码")
//                    return false;
//                }
//                $('input[name=code]').val(value)
//
//                $('#btn').removeAttr('onclick');
//            });
//        }, 'html')
//    }
</script>
{/block}
{block name="footer"}
{/block}